/****************************************************************************
 * @file     system_NANO1xx.h
 * @author   NuMicro MCU Software Team
 * @version  V1.01
 * @date     26. November 2010
 * @brief    CMSIS ARM Cortex-M0 Device Peripheral Access Layer Header File
 *
 * @note
 * Copyright (C) 2010 Nuvoton Technology Corp. All rights reserved.
 *
 * @par
 * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
 * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
 *
 ******************************************************************************/


#ifndef __SYSTEM_NANO1xx_H
#define __SYSTEM_NANO1xx_H

#ifdef __cplusplus
 extern "C" {
#endif 


/*----------------------------------------------------------------------------
  Define SYSCLK
 *----------------------------------------------------------------------------*/
#define __XTAL      (12000000UL)	/* HFEXT */
#define __RTC_XTAL  (32768UL)		/* LFEXT */
#define __IRC12M    (12000000UL)	/* HFIRC */
#define __IRC10K    (10000UL)		/* LFIRC */
#define __HSI       (__IRC12M)      /* Factory Default is internal 12MHz */
extern uint32_t SystemCoreClock;     /*!< System Clock Frequency (Core Clock)  */


/**
 * Initialize the system
 *
 * @param  none
 * @return none
 *
 * @brief  Setup the microcontroller system.
 *         Initialize the System and update the SystemCoreClock variable.
 */
extern void SystemInit (void);

/**
 * Update SystemCoreClock variable
 *
 * @param  none
 * @return none
 *
 * @brief  Updates the SystemCoreClock with current core Clock 
 *         retrieved from cpu registers.
 */
extern void SystemCoreClockUpdate (void);

#ifdef __cplusplus
}
#endif

#endif /* __SYSTEM_NANO1xx_H */
